Encoding of security codes

ABSTRACT

A method and apparatus for encoding security codes are provided. In the method and apparatus a first code, which may be an erroneous code, is compared to a set of codes to identify a code portion. The code portion may be identified as contributing to inducing erroneous entry of the first code. The likelihood associated with issuing a second code including the code portion may be updated to negatively bias issuing the second code.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.14/223,399, filed Mar. 24, 2014, entitled “ENCODING OF SECURITY CODES,”the disclosure of which is incorporated herein by reference in itsentirety.

BACKGROUND

Security codes are often used in user interactions with securitysystems, whereby the security system may require manual input ofsecurity codes for bridging a communications gap or providing a benefitor service to a user or the user's associated devices. Examples ofsecurity codes include secret keys used in a login or bootstrappingprocess as well as promotional codes or gift card identifiers used toclaim a monetary benefit in an electronic commerce application, amongmany others. The verification of security codes may require that a userprovide an issued code. Further, many verification processes are notfault-tolerant to mistakes that are commonly made by users in manuallyentering the security codes. The verification processes may prompt auser to reenter an erroneous code, which may ultimately frustrate someusers and negatively impact their user experience.

Accordingly, it is often challenging to construct security codes in amanner that positively impacts user experience. In particular, it isoften challenging to have security codes that are constructed such thatthe likelihood of observing a mistake in code entry is reduced.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments in accordance with the present disclosure will bedescribed with reference to the drawings, in which:

FIG. 1 shows an example of code validation in accordance with at leastone embodiment;

FIG. 2 shows an example of an environment for code generation inaccordance with at least one embodiment;

FIG. 3 shows an example of a method for providing a string code inaccordance with at least one embodiment;

FIG. 4 shows an example of an environment for code validation inaccordance with at least one embodiment;

FIG. 5 shows an example of a method for code validation in accordancewith at least one embodiment;

FIG. 6 shows a representation of an example of a code space inaccordance with at least one embodiment;

FIG. 7 shows an example of a method for adjusting encoding heuristics inaccordance with at least one embodiment; and

FIG. 8 illustrates an environment in which various embodiments can beimplemented.

DETAILED DESCRIPTION

In the following description, various embodiments will be described. Forpurposes of explanation, specific configurations and details are setforth in order to provide a thorough understanding of the embodiments.However, it will also be apparent to one skilled in the art that theembodiments may be practiced without the specific details. Furthermore,well-known features may be omitted or simplified in order not to obscurethe embodiment being described.

Techniques described and suggested herein include encoding securitycodes. A security code (also referred to herein as code) may comprise aplurality of symbols, whereby a symbol may be a bit, a Byte, analphanumeric character or a punctuation mark, among many other types ofsymbols. Examples of the code include an ordered combination of symbolsas described herein. The code may include security information or asecurity configuration or may be a secret key or an algorithm seed. Thecode may be used to bridge a communication gap between systems orfacilitate transferring data to remote or disconnected devices. Forexample, manual entry of the code may be required to connect systemswith one another or transfer data between a service and a device. Thecode may also be utilized for electronic commerce applications, whereby,for example, the code may identify a particular gift certificate, giftcard, voucher or token, and may be used to claim or redeem a certainmonetary value.

Codes may vary in length, whereby the length of the code may be afunction of the total number of codes in use in a system, the totalnumber of unique codes assigned to a set of users, and/or a number ofitems in the sequence required to ensure that the probability of arandomly generated code of the same length being a valid code is belowsome predetermined threshold. Further, when users are required tomanually enter a code, the likelihood of making a mistake in enteringthe code increases as the size of the code increases. While some codesmay be classified as error-detecting or error-correcting (i.e., thecodes are constructed to enable a data processing system to identify orcorrect one or more mistakes in the code), such construction often comesat the expense of increased code length. Furthermore, error-detecting orerror-correcting may be limited in the number or type of mistakes theyare constructed to detect or correct. In the event that a user providesan erroneous code or makes a mistake in entering a code (for example, byadding symbols to the code or replacing or swapping a set of symbolswith another set of symbols), a user may become frustrated at having toreattempt code entry. Further, the overall user experience ininteracting with a system may be negatively affected.

Codes may be constructed based at least in part on historical manualinput performance of users. A verification entity may be used to assesssuccessful and unsuccessful instances of inputted codes. Further, anencoding algorithm may be updated to avoid problematic encodingconstructions based at least in part on code verification results. Codeconstruction may be further varied in response to user or clientattributes. For example, input device properties, user profile data orother similar data that may relate a particular user to a subset of theoverall user population.

The code verification entity may receive a first code from a user. Thefirst code may be erroneously entered and rendered invalid due to theerroneous entry. The verification entity may determine whether the firstcode is valid. For example, the verification entity may check one ormore parity bits associated with the first code to determine whether thefirst code is valid. Alternatively, the verification entity may at leastpartially decode the code to identify a decoding or encoding algorithmassociated with the code. The verification entity may utilize theidentified algorithm to determine whether the code is valid.Furthermore, the verification entity may consult a database of codesidentified as having been issued for use. The code may be deemed asinvalid if the code is determined not to belong to a set of codes of thedatabase.

Upon determining that the first code is invalid, the verification entitymay proceed to identify a potentially problematic code construction thatmay have contributed to inducing a user to erroneously enter the firstcode. The verification entity may identify a set of codes based at leastin part on a distance between the first code and the set of codes. Thedistance may be measured using an edit distance metric or other stringsimilarity metric, as described herein. For example, the set of codesmay be different from the first code by one or more symbols.Furthermore, one or more changes made to a code of the identified set ofcodes may result in arriving at the first code.

Following identification of the set of codes, the verification entitymay identify a portion of the first code or a portion of a code of theidentified set of codes as potentially inducing erroneous code entry.The portion may be a set of symbols, whereby a portion of the set may besymbols not in common between the first code and the code of theidentified set of codes. For example, the first code may be compared toeach code of the identified set of codes. Based at least in part on thecomparison, some symbols in common between the codes may be dispensed.However, remaining symbols may be identified as potentially inducingerroneous code entry.

It may be desired that the identified portion not be included in furthercodes issued for use. Accordingly, an algorithm used to generate codesmay be negatively biased to disfavor issuing a second code including theidentified portion of symbols. The algorithm may be instructed to reducethe likelihood associated with generating the second code including theidentified portion of symbols. For example, a user may conflate thenumeral ‘5’ with the letter ‘S’, and, accordingly, an algorithm may benegatively biased to disfavor issuing codes including the numeral ‘5’and the letter ‘S’. Furthermore, if it has been identified that one ormore users mistakenly entered the letters TYT′ and ‘YTY’ due to theproximity of the letters on a QWERTY keyboard, a penalty may beinstituted for generating codes including ‘TYT’ and ‘YTY’.

Issuing a code for use may include issuing a proof-of-work problem whoseoutcome is the code. Further, negatively biasing code issuance todisfavor issuing a second code including an identified portion ofsymbols may include negatively biasing receiving the second codeincluding the identified portion of symbols. Proof-of-work systems mayrequire a party to follow a procedure to generate the second code,whereby the second code may be provided to a validation entity.Accordingly, the procedure may be biased or modified so as to disfavorthe second code being generated or provided for validation (for example,using an input device).

FIG. 1 shows an example of code validation in accordance with at leastone embodiment. A validation entity 110, which may be a collection ofcomputing resources and/or other resources collectively configured tovalidate a code or determine one or more undesirable code constructions,receives a request to validate a code. As used herein, unless otherwisestated or clear from context, the collection of computing resources maybe a computer system program, process, client, server, service,application, module, operating system entity, controlling domain orcombinations of these and/or other such computer system entities. Thecollection of computing resources may be a client and/or a server and insome embodiments may be configured to send and/or receivecommunications, data, requests and/or other such requests to and/or fromother services within the computer system. The request is received froma user device 102 and includes a code that is sought to be validated.The validation entity 110 determines whether the code is valid, forexample, by determining whether the received code has been issued foruse. If the validation entity 110 determines that the code is not valid,the validation entity may identify one or more undesirable codeconstructions that may have contributed to the code being erroneouslyentered by a user. The validation entity 110 identifies a set of validcodes, whereby the valid codes may be neighboring codes to the receivedcode. The set of valid codes may also be within a distance of thereceived code, for example, as measured by a distance metric in a codespace.

Upon determining the set of valid codes, the validation entity 110evaluates the received code together with each valid code of the set ofvalid codes to identify the one or more code constructions. As describedherein, the validation entity 110 may compare the two codes and identifythe one or more code constructions based at least in part onsimilarities or differences between the two codes. The one or more codeconstructions may be a portion of the received code or a portion of avalid code of the set of valid codes. The one or more code constructionsmay be identified as having undesirable properties, whereby, forexample, a user may mistakenly perceive one or more symbols of the codeconstructions or mistype the one or more symbols due to their proximityon a layout of an input device. Upon identifying the code constructions,the code constructions may be excluded from usage in future codes.Further, the generation of future codes may be biased so as to disfavorthe issuing codes having the identified constructions to users.

FIG. 2 shows an example of an environment for code generation inaccordance with at least one embodiment. A user device 202 requests thata code be provided to the user device. The code may comprise a string ofcharacters (for example, alphanumeric characters, punctuation marks orsymbols, among others). Further, the code may be a security code for usein authentication, such as multi-factor authentication, or as apassword, such as a one-time password (OTP). For example, the code maybe requested for use in accessing a service, a device or an account,among others, whereby a request for access to the service, device oraccount may be validated based at least in part on the provided code. Inaddition, the code may be used for redemption of a benefit. For example,the code may be a gift card number for use in an electronic commerceapplication. The code may be unique and distinguishable from other codesthat are provided to the user or other users. Where the code is issuedfor use in validating the user, the validation may be predicated uponthe fact that the user provides the code as issued and the validationmay not be completed or may fail if the user were to provide a differentcode or a variation of the issued code. Accordingly, it may be importantfor the code to be distinguishable from other codes issued in a system.

The user device 202 may be any type of device that is configured torequest that a code be issued for a user. Further, the user device 202may be configured to receive a system-generated code or submit the codefor validation. For example, the user device 202 may be any type ofconsumer electronics device including a laptop or desktop computer, atablet, a mobile phone or a smartphone, a smart television, a set-topbox or a stream player or a network-enabled digital optical disk player,such as a Blu-Ray™ player or digital versatile disc (DVD™) player, amongothers. The user device 202 may be configured to communicate using anytype of communication protocol including a cellular wirelesscommunications protocol, such as fourth generation (4G) communicationsor long term evolution (LTE™), a wireless local area network (WLAN)communications protocol, such as an Institute for Electrical andElectronics Engineers (IEEE) 802.11, 802.16 or 802.21 communicationprotocol, or short range communications protocol, among others.

The user device 202 may be equipped with a processor, such as a centralprocessing unit (CPU) or a graphics processing unit (GPU), that providescomputing functionality to a user. Examples of a CPU include thoseutilizing a complex instruction set computing (CISC) architecture, suchas the x86 CPU, and others that utilize a reduced instruction setcomputing (RISC) architecture, such as the advanced RISC machine (ARM)CPU. The user device 202 may also be equipped with one or moreperipherals or integrated input devices, such as a touchscreen thatresponds to a fingertip or a stylus input, a physical keyboard, adigital camera, a microphone, a touchpad or a mouse, among others.Furthermore, the user device 202 may be configured with one or moreapplications that facilitate receiving voice inputs or voice commandsfrom a user via the microphone or image inputs via a digital camera. Inaddition, the user device 202 may also be equipped with one or moreoutput devices, output peripherals or integrated output devices, such asa screen or speakers, whereby if the user device 202 is equipped with atouchscreen, the touchscreen may service as both an input and an outputdevice. The user device 202 may further be equipped with a globalpositioning system (GPS) circuitry that enables locating the device. Theuser device 202 may further be equipped with an operating system and maybe configured to execute software applications and programs compatiblewith the operating systems. Although the user device 202 is describedherein as a party requesting that a code be issued for a user orrequesting validation of the code, any party may request that a code beissued or validated. For example, one or more services, which may be acollection of computing resource or other resources, may be configuredto request the code to be issued or validated.

A string encoder 204 receives the request for issuing the code from theuser device 202. The string encoder may be a collection of computingresources and/or other resources collectively configured to receive therequest from the user device 202 or provide the code to the user device202 in response to the request. As used herein, unless otherwise statedor clear from context, the collection of computing resources may be acomputer system program, process, client, server, service, application,module, operating system entity, controlling domain or a combination ofthese and/or other such computer system entities. The collection ofcomputing resources may be a client and/or a server and in someembodiments may be configured to send and/or receive communications,data, requests and/or other such requests to and/or from other serviceswithin the computer system.

The code provided to the user device 202 may be human-readable in thatit may comprise characters that may be easily identifiable by a humanoperator of the user device 202. The code provided to the user device202 is referred to herein as a string code or a transformed code due tothe fact that the code may be transformed from another representation(for example, a binary representation) into a representation that ismeaningful or identifiable to a human operator. For example, a humanoperator of the user device 202 may be less likely to make a mistake inentering a code represented as having alphanumeric characters andsymbols than an equivalent code represented as binary digits.

The string encoder 204 retrieves a binary code from a code database 206for use in generating a string code for the user. The code database 206may retain one or more binary codes that are valid for use. The codedatabase 206 may generate a binary code as a request for issuing thecode is received. Alternatively, binary codes that may be used may bepre-generated, and a binary code from a pre-generated list may beprovided to the string encoder 204. As described herein, each binarycode may be unique and may be separately identifiable from other binarycodes.

The string encoder 204 may transform the binary code received from thecode database 206 to a string code to be provided to the user device202. Any type of transformation may be employed by the string encoder204 to transform the binary code. For example, the string encoder 204may transform the binary code to hexadecimal representation to producethe string code. Accordingly, if the binary code is ‘11100111’, thestring code in hexadecimal representation will be ‘E7’.

The string encoder 204 may further utilize encoder heuristics 208 ingenerating the string code based at least in part on the binary code.Heuristics may be self-evaluating or self-educating techniques forobtaining a solution based at least in part on observations. Theheuristics may place limitations on or penalize generating certainstring codes that may potentially be mistakenly entered by a userrequesting validation based at least in part on the string code.Further, the heuristics may favor the generation of codes that are notobserved to cause confusion to a user entering the code on the userdevice 202. The heuristics may be established or formulated based atleast in part on observed mistakes or errors in codes that are providedfor validation as described herein. For example, when a user provides acode for validation, an error made by the user in entering the code maybe observed. Further, a feature, attribute or aspect of the code thatcontributed to or induced the error may be identified.

The heuristics may penalize future generation of codes having theidentified feature, attribute or aspect by the string encoder 204 orfuture transformations of binary codes into string codes that have theidentified feature, attribute or aspect by the string encoder 204. Forexample, if it has been determined that users who enter a string codefor validation with a user device 202 having a touchscreen inputperipheral commonly interchange the letters ‘E’ and ‘F’ or the symbol‘@’ with the letter ‘2’, the heuristics may penalize the string encoder204 from generating string codes including the features. Aserror-inducing codes or portions thereof are identified, a numericpenalty may be associated with the code or portion. Upon generating anew code, the new code may be evaluated to determine the penaltyassociated with the code. The penalty may be a function of the penaltiesassociated with the various portions of the code, whereby, for example,the penalty may be the sum of the penalties associated with the variousportions of the code. If the penalty associated with the code is foundto exceed a threshold, the code may not be employed or provided for use.In another embodiment, a distribution associating various code segmentswith probabilities of issuing the code segments may be used. Theprobabilities may be updated in accordance with encoding heuristics andthe distribution may be used when constructing codes, whereby if theprobability associated with a code segment outside a specified range,the code segment may not be used in code construction.

Following receipt of the request to issue the code, the string encoder204 transforms the binary code retrieved from the code database 206 inaccordance with the heuristics received from the encoder heuristics 208to produce the string code. The string encoder 204 then provides thestring code to the user device 202.

FIG. 3 shows an example of a method for providing a string code inaccordance with at least one embodiment. A string encoder, such as thestring encoder described with reference to numeral 204 in FIG. 2,receives 302 a request to issue a code to a user. The string encoderretrieves 304 a binary code from a binary code database, such as thecode database described with reference to numeral 206 in FIG. 2. Thestring encoder then receives 306 encoding heuristics for use intransforming the binary code to a string code. The string code may morecompactly represent the binary code, for example, in terms of the numberof symbols used. Further, the string code may be more convenient toenter by a user when code validation is required as the string code maymore compactly represent information than the binary code. As describedherein, the encoding heuristics may place limits on or penalizegenerating certain string codes that are prone to entry errors. It isnoted that by excluding usage of some string codes or string codesfeatures or properties, the encoding heuristics may narrow the availablecode space and may require longer string codes to be used to transform abinary code.

The string encoder then applies 308 the encoding heuristics to transformthe binary code to a string code as described herein. Further, thestring encoder provides 310 the string code to the user in response tothe request. It is noted that in alternative embodiments, the encodingheuristics may alternatively be used to bias the generation of binarycodes towards more favorable codes. For example, a binary code may betransformed to a string code in accordance with a specifiedtransformation function. The encoding heuristics may be applied tobinary code generation, whereby the generated binary code whentransformed (for example, using a transformation function) results in astring code having desired properties or lacking certain undesiredproperties as appropriate.

Following providing the string code to the user, the user may seek touse the string code, for example, as part of an application request. Thestring code may encode security information, such as encoded data for asecurity configuration, a secret key, an algorithm seed or bootstrapdata, among others. The security code may be manually entered by a uservia a user device as described herein. For example, the user may utilizea keyboard or a touchscreen to enter the security code. Further, thesecurity code may be printed or transcribed and may be entered by beingcaptured by a digital camera of the user device. The user device maysubmit a request to validate the string code, whereby upon validation,one or more actions may be performed, such as authenticating the userfor access to a service.

FIG. 4 shows an example of an environment for code validation inaccordance with at least one embodiment. A user device 402 submits arequest to validate a code to a validation entity 410. The user device402 may be any type of consumer electronic device, such as the userdevice described with reference to numeral 202 in FIG. 2. The requestmay include a code entered by a user. The code may be entered correctlyor erroneously. An erroneously entered code may include additionalcharacters, symbols or pieces or portions of the code or may be missinga character, symbol or piece or portion of the code. Further, theerroneous code may be of the same size as an issued code but may haveone or more characters that do not match those of the issued code. Forexample, if characters of a code are mistyped or swapped upon entry, theresultant code is erroneous.

Erroneous entry of the code may be due to pitfalls associated withcertain code features or user device input peripherals or integratedinput devices. For example, a human operator of a user device mayinterpret or falsely perceive two adjacent ‘V’ letters in a code as theletter ‘W’ and may, accordingly, enter the letter. Similarly, a cameramay falsely capture the letters. Furthermore, the numbers ‘0’ and ‘1’may be confused with the letters ‘o’ and ‘i’, respectively. In addition,certain keyboard or keypad layouts may induce operators to mistypecertain characters or symbols. For example, due to a QWERTY keyboardlayout, operators may interchange the letters ‘m’ and ‘n’ or ‘t’ and‘y’, which are adjacent in the layout. Additional error-prone codes maybe discovered based at least in part on identified error prone codes.For example, codes including adjacent characters in a QWERTY layout maybe deemed as undesirable due at least in part to potential swapping ofthe characters.

Upon receiving the request to validate the code, the validation entity410 may evaluate the code to determine whether the code is valid. Avalid code may be a code for which a corresponding code has been issuedby the code database 406 or for which a corresponding code is retainedby the code database 406. For example, a valid code may be identical toa code retained or issued by the code database 406. As described herein,the code database 406 may retain a record of all valid codes or allissued codes. The code received with the request may be compared withone or more retained records and a determination may be made as towhether the code is valid.

If the code is determined to be invalid, a notification may be sent tothe user device 402 and the user may be requested to provide a validcode or reenter the code. The notification may be sent over a network,whereby the network may be a public network, such as the Internet, or aprivate network. Further, a notification of a code validation failuremay be sent to the string encoder 404. The erroneous code may also becompared with one or more codes (for example, string codes issued by thestring encoder 404) to identify a set of codes having an edit distancethat is within a threshold to the invalid code. Alternatively, thevalidation entity 410 may identify a specified number of codes that areclosest to the invalid code as measured by a distance metric.Identifying the set of codes may be based at least in part on bothfactors as used in unison. For example, the set of codes may be thespecified number of codes that are closest to the invalid code and arewithin the specified distance range of the invalid code. One or more ofthe identified codes may have been incorrectly entered as the invalidcode. Differences or similarities between the received code and theidentified codes or features or properties of the codes may be used toconstruct or update encoding heuristics. Further, attributes associatedwith a user or a user device may also be used to construct or updateencoding heuristics.

As described herein, encoding heuristics may be provided to a partyrequesting authentication and may be used to bias against codegeneration by the party. Accordingly, the encoding heuristics may beused to bias against receiving a code having certain properties, such asa symbol pattern. Furthermore, in proof-of-work systems theadvertisement of a proof-of-work problem may be biased so as to disfavorhaving a resulting code as an outcome, whereby the resulting code hasthe symbol pattern. Accordingly, if the resulting code is manuallyentered by a user, certain code constructions having undesirableproperties may be avoided. Furthermore, biasing code issuance mayinclude biasing a reward issuance in a proof-of-work system or othersystem based at least in part on the code.

Due to the fact that codes that are issued by the string encoder 404based at least in part on encoding heuristics are expected to besubmitted for validation (for example, at a later point in time),biasing the issuance of a code or controlling a construction of anissued code as described herein is equivalent to biasing receiving acode with certain properties or controlling a construction of a receivedcode.

FIG. 5 shows an example of a method for code validation in accordancewith at least one embodiment. In the process 500, a validation entity,such as the validation entity described with reference to numeral 410 inFIG. 4, receives 502 a request to validate a code. The request tovalidate the code includes the code sought to be validated, whereby thecode may be correctly or erroneously reproduced, transcribed ordeciphered from an issued code. The validation entity then determines504 whether the received code is valid. Determining whether the receivedcode is valid may include evaluating whether the received codecorresponds to at least one code retained in a code storage system, suchas the code database described with reference to numeral 406 in FIG. 4.The code storage system may be a database that includes all valid codes(for example, codes issued to users) and a code may correspond to aretained code if the code matches a code in the database.

In various embodiments, a code may include information usable fordetermining whether the code is valid. For example, a generationidentifier may be encoded in a string code, whereby the generationidentifier may be used to identify a particular algorithm used forgenerating the code. The code may be checked to determine validity basedat least in part on the generation identifier. Upon determining that thereceived code is valid, the validation entity sends 506 a notificationindicating that the code is valid. The notification may be sent to aparty or service for which code validation was requested. For example,if the validated code was a promotional code or a redemption code in anelectronic commerce application, the notification may be sent to apayment system of the electronic commerce application.

Upon determining that the received code is invalid, the validationentity then identifies 508 a set of neighboring codes to the receivedcode in a code space. Each neighboring code of the set of neighboringcodes may be within a distance as measured by a distance metric to thereceived code. Examples of the code space include an n-dimensional spacefor an n-length code as described with reference to FIG. 6 herein. Thedistance between two points may be a function of the likelihood of acharacter or symbol substitution to occur, whereby, for example, thedistance may be inversely proportional to the likelihood of asubstitution of characters. A likelihood function may be used toapproximate the likelihood of symbol substitution, which may be based onobserved user behavior. The set of codes may be identified by selectingone or more of the closest m codes to the received code, where m is aninteger. Alternatively, the set of codes may be identified by selectingone or more codes having a distance to the received code that is below athreshold.

The validation entity then identifies 510 one or more alterations to thereceived code based at least in part on the identified set ofneighboring codes. As described herein, an alternation may be one ormore edits made to a member of the identified set of codes resulting inthe received code. The alteration may be a substitution or swap to oneor more characters of a member of the identified set of codes. Thealteration may be due to a problematic code construction in one or morecodes of the identified set, whereby the code construction may inducethe alteration or may cause users to erroneously enter the code. Thevalidation entity then adjusts 512 encoding heuristics based at least inpart on the identified alterations. For example, the validation entitymay adjust the encoding of string codes so as to bias against ordisfavor generating string codes having a similar construction.

FIG. 6 shows a representation of an example of a code space inaccordance with at least one embodiment. The code space 600 istwo-dimensional, whereby a first dimension pertains to a first symbol ofthe code and a second dimension pertains to a second symbol of the code.A point in the two-dimensional code space 600 corresponds to atwo-symbol code and the distance between any two points is a function ofthe likelihood of substituting one or both symbols of the first codewith one or both symbols of the second code. The distances are based atleast in part on the likelihood of symbol substitution using a QWERTYkeyboard. It is noted that for other types of input devices, theplacement or distance between the various codes may be different.

For example, the distance between the code ‘AA’ 602 and the code ‘AQ’604 is a function of the likelihood of substituting the second symbol ofthe code ‘AA’ 602 to produce the code ‘AQ’ 604 using a QWERTY keyboard.The code ‘AA’ 602 may be close in the code space 600 to the code ‘AQ’604 because the letters ‘A’ and ‘Q’ are neighbors in a QWERTY layout.Accordingly, there may be a higher likelihood of a user inadvertentlyentering the code ‘AQ’ 604 as the code ‘AA’ 602 than the userinadvertently entering the code ‘AT’ 604 as the code ‘AA’ 602 due to thefact that the letter ‘T’ is farther away from the letter ‘A’ in a QWERTYlayout. Similarly, the code ‘M’ 608 may be close to the code ‘AA’ 602due to the fact that a user may incorrectly perceive ‘AA’ as ‘M’.

The closer the distance between two codes in the code space 600, thehigher is the likelihood that a user error (for example, symbolsubstitution, omission or addition) causes a first code (for example,the identified neighboring code) to be entered as the second code (forexample, the received code erroneously entered by the user). Thedistance metric may be based at least in part on attributes associatedwith users or devices, among others. As described herein, the characterlayout of keyboards, touchscreens or other input devices may be used todetermine the calculation of the distance. In addition, user profileinformation, such as user language, a preferred written language of theuser, user location or a type of human interface device used by theuser, may also be used to determine the distance. For example,English-speaking users may be more likely to conflate certain charactersor symbols than French or German speaking users.

Following identifying the set of codes having a specific edit distanceto the erroneous code, the encoding heuristics may be updated topenalize or disfavor issuing codes to users having certain features orcode construction attributes, such as those observed in the identifiedset of codes or the erroneous set of codes. Making reference to FIG. 6,issuing the code ‘AA’ 602, ‘AQ’ 604 and ‘M’ 608 may be penalized,whereas issuing the code ‘AT’ 606 may not be penalized. Penalizing thegeneration of such codes results in excluding codes having featuresobserved to cause the codes to be erroneously entered for validation.The penalizing further limits the space of issued codes to those that donot have such undesirable properties.

Due to the fact that users having similar attributes may be expected tomake similar mistakes in entering codes for validation, encodingheuristics may further be used to penalize or disfavor issuing codeswith certain features based at least in part on user attributes. Forexample, if one or more users have been observed to make mistakes withrespect a certain code feature, there may be an additional penaltyassociated with issuing, to a similar user, a code with the same orsimilar code feature. The similar user may be a user having attributesthat are in common with the one or more users. User attributes mayinclude a keyboard layout of the user, a preferred written language ofthe user or a location of the user, among others. Further, userattributes may also include attributes of a user device, such as a typeof human interface of the user device. For example, the human interfaceof the user device may be a keyboard, touchscreen, keypad orgesture-based input device. For instance, if keyboard users areidentified to conflate the characters ‘TY’ with ‘YT’ in certain codes,there may be an additional penalty associated with issuing a codeincluding the characters ‘TY’ or ‘YT’ to a user that is known to be akeyboard user. This penalty may, for example, be larger than the penaltyassociated with issuing the same code to a user that is identified asusing a smartphone-based digital camera application in capturing aprinted code.

FIG. 7 shows an example of a method for adjusting encoding heuristics inaccordance with at least one embodiment. In the process 700, avalidation entity receives 702 a request to validate a code. The requestto validate the code may be an application request, such as a loginrequest, and the code may be part of security information, such as asecret key or an algorithm seed. The validation entity then identifies704 one or more user or device attributes associated with the receivedrequest. For example, the one or more user or device attributes may beidentified based at least in part on a header of the application requestor a retained profile of a user submitting the request. The validationentity then identifies 706 a construction of the code that causes thereceived code to be erroneously entered. As described herein, theconstruction may be one or more symbols of the code or a portion of thecode. Further, the construction of the code may be identified by firstcomparing the received code to a valid code that is within an editdistance of the received or invalid code. The comparison may yield thata first portion of the codes are identical or in common with oneanother, whereas a difference may exist between a second portion of thereceived code and the valid code. Utilizing the assumption that thevalid code had been issued to the user and mistakenly entered by theuser, the second portion of the valid code may be identified as aconstruction that leads to erroneous entry. The validation entity thenadjusts 708 heuristics to penalize issuing a code with similarconstruction to users having similar user or device attributes as thatof the user from which the erroneous code is received.

The techniques described herein may be applicable to any type of code.While human-readable codes are used for illustration, the codesdescribed herein may also be non-human-readable, such as bar codes orquick response (QR) codes. For example, certain non-human readable codesmay be prone to error and certain attributes of the non-human readablecode may contribute to inducing various errors upon entry. For example,certain bar codes may be erroneously entered due to the fact that ascanner may not have a high resolution. Further, the techniques areapplicable to any context where the transport of codes (for example,from first form to a second form) has the potential of error, such asdue to the transmission of codes over a noisy channel. In addition,voice-based codes that require a user to vocally enter a code through amicrophone may also be generated in accordance with the embodimentsdescribed herein. Furthermore, accelerometer-based inputs that mayrequire a user to motion or wave a smartphone, tablet or other devicemay be also be subject to being generated in accordance with theembodiments described herein. For example, certain error-pronevoice-based inputs or motions may be avoided to reduce the likelihood ofa user-based error. The embodiments described herein may be applicablein any way of providing information using one or more input devices thatcan be prone to error when entered.

FIG. 8 illustrates aspects of an example environment 800 forimplementing aspects in accordance with various embodiments. As will beappreciated, although a web-based environment is used for purposes ofexplanation, different environments may be used, as appropriate, toimplement various embodiments. The environment includes an electronicclient device 802, which can include any appropriate device operable tosend and/or receive requests, messages or information over anappropriate network 804 and, in some embodiments, convey informationback to a user of the device. Examples of such client devices includepersonal computers, cell phones, handheld messaging devices, laptopcomputers, tablet computers, set-top boxes, personal data assistants,embedded computer systems, electronic book readers and the like. Thenetwork can include any appropriate network, including an intranet, theInternet, a cellular network, a local area network, a satellite networkor any other such network and/or combination thereof. Components usedfor such a system can depend at least in part upon the type of networkand/or environment selected. Protocols and components for communicatingvia such a network are well known and will not be discussed herein indetail. Communication over the network can be enabled by wired orwireless connections and combinations thereof. In this example, thenetwork includes the Internet, as the environment includes a web server806 for receiving requests and serving content in response thereto,although for other networks an alternative device serving a similarpurpose could be used as would be apparent to one of ordinary skill inthe art.

The illustrative environment includes at least one application server808 and a data store 810. It should be understood that there can beseveral application servers, layers or other elements, processes orcomponents, which may be chained or otherwise configured, which caninteract to perform tasks such as obtaining data from an appropriatedata store. Servers, as used herein, may be implemented in various ways,such as hardware devices or virtual computer systems. In some contexts,servers may refer to a programming module being executed on a computersystem. As used herein, unless otherwise stated or clear from context,the term “data store” refers to any device or combination of devicescapable of storing, accessing and retrieving data, which may include anycombination and number of data servers, databases, data storage devicesand data storage media, in any standard, distributed, virtual orclustered environment. The application server can include anyappropriate hardware, software and firmware for integrating with thedata store as needed to execute aspects of one or more applications forthe client device, handling some or all of the data access and businesslogic for an application. The application server may provide accesscontrol services in cooperation with the data store and is able togenerate content including, but not limited to, text, graphics, audio,video and/or other content usable to be provided to the user, which maybe served to the user by the web server in the form of HyperText MarkupLanguage (“HTML”), Extensible Markup Language (“XML”), JavaScript,Cascading Style Sheets (“CSS”) or another appropriate client-sidestructured language. Content transferred to a client device may beprocessed by the client device to provide the content in one or moreforms including, but not limited to, forms that are perceptible to theuser audibly, visually and/or through other senses including touch,taste, and/or smell. The handling of all requests and responses, as wellas the delivery of content between the client device 802 and theapplication server 808, can be handled by the web server using PHP:Hypertext Preprocessor (“PHP”), Python, Ruby, Perl, Java, HTML, XML oranother appropriate server-side structured language in this example. Itshould be understood that the web and application servers are notrequired and are merely example components, as structured code discussedherein can be executed on any appropriate device or host machine asdiscussed elsewhere herein. Further, operations described herein asbeing performed by a single device may, unless otherwise clear fromcontext, be performed collectively by multiple devices, which may form adistributed and/or virtual system.

The data store 810 can include several separate data tables, databases,data documents, dynamic data storage schemes and/or other data storagemechanisms and media for storing data relating to a particular aspect ofthe present disclosure. For example, the data store illustrated mayinclude mechanisms for storing production data 812 and user information816, which can be used to serve content for the production side. Thedata store also is shown to include a mechanism for storing log data814, which can be used for reporting, analysis or other such purposes.It should be understood that there can be many other aspects that mayneed to be stored in the data store, such as page image information andaccess rights information, which can be stored in any of the abovelisted mechanisms as appropriate or in additional mechanisms in the datastore 810. The data store 810 is operable, through logic associatedtherewith, to receive instructions from the application server 808 andobtain, update or otherwise process data in response thereto. Theapplication server 808 may provide static, dynamic or a combination ofstatic and dynamic data in response to the received instructions.Dynamic data, such as data used in web logs (blogs), shoppingapplications, news services and other such applications may be generatedby server-side structured languages as described herein or may beprovided by a content management system (“CMS”) operating on, or underthe control of, the application server. In one example, a user, througha device operated by the user, might submit a search request for acertain type of item. In this case, the data store might access the userinformation to verify the identity of the user and can access thecatalog detail information to obtain information about items of thattype. The information then can be returned to the user, such as in aresults listing on a web page that the user is able to view via abrowser on the user device 802. Information for a particular item ofinterest can be viewed in a dedicated page or window of the browser. Itshould be noted, however, that embodiments of the present disclosure arenot necessarily limited to the context of web pages, but may be moregenerally applicable to processing requests in general, where therequests are not necessarily requests for content.

Each server typically will include an operating system that providesexecutable program instructions for the general administration andoperation of that server and typically will include a computer-readablestorage medium (e.g., a hard disk, random access memory, read onlymemory, etc.) storing instructions that, when executed by a processor ofthe server, allow the server to perform its intended functions. Suitableimplementations for the operating system and general functionality ofthe servers are known or commercially available and are readilyimplemented by persons having ordinary skill in the art, particularly inlight of the disclosure herein.

The environment, in one embodiment, is a distributed and/or virtualcomputing environment utilizing several computer systems and componentsthat are interconnected via communication links, using one or morecomputer networks or direct connections. However, it will be appreciatedby those of ordinary skill in the art that such a system could operateequally well in a system having fewer or a greater number of componentsthan are illustrated in FIG. 8. Thus, the depiction of the system 800 inFIG. 8 should be taken as being illustrative in nature and not limitingto the scope of the disclosure.

The various embodiments further can be implemented in a wide variety ofoperating environments, which in some cases can include one or more usercomputers, computing devices or processing devices which can be used tooperate any of a number of applications. User or client devices caninclude any of a number of general purpose personal computers, such asdesktop, laptop or tablet computers running a standard operating system,as well as cellular, wireless and handheld devices running mobilesoftware and capable of supporting a number of networking and messagingprotocols. Such a system also can include a number of workstationsrunning any of a variety of commercially-available operating systems andother known applications for purposes such as development and databasemanagement. These devices also can include other electronic devices,such as dummy terminals, thin-clients, gaming systems and other devicescapable of communicating via a network. These devices also can includevirtual devices such as virtual machines, hypervisors and other virtualdevices capable of communicating via a network.

Various embodiments of the present disclosure utilize at least onenetwork that would be familiar to those skilled in the art forsupporting communications using any of a variety ofcommercially-available protocols, such as Transmission ControlProtocol/Internet Protocol (“TCP/IP”), User Datagram Protocol (“UDP”),protocols operating in various layers of the Open System Interconnection(“OSI”) model, File Transfer Protocol (“FTP”), Universal Plug and Play(“UpnP”), Network File System (“NFS”), Common Internet File System(“CIFS”) and AppleTalk. The network can be, for example, a local areanetwork, a wide-area network, a virtual private network, the Internet,an intranet, an extranet, a public switched telephone network, aninfrared network, a wireless network, a satellite network and anycombination thereof.

In embodiments utilizing a web server, the web server can run any of avariety of server or mid-tier applications, including Hypertext TransferProtocol (“HTTP”) servers, FTP servers, Common Gateway Interface (“CGI”)servers, data servers, Java servers, Apache servers and businessapplication servers. The server(s) also may be capable of executingprograms or scripts in response to requests from user devices, such asby executing one or more web applications that may be implemented as oneor more scripts or programs written in any programming language, such asJava®, C, C# or C++, or any scripting language, such as Ruby, PHP, Perl,Python or TCL, as well as combinations thereof. The server(s) may alsoinclude database servers, including without limitation thosecommercially available from Oracle®, Microsoft®, Sybase® and IBM® aswell as open-source servers such as MySQL, Postgres, SQLite, MongoDB,and any other server capable of storing, retrieving and accessingstructured or unstructured data. Database servers may includetable-based servers, document-based servers, unstructured servers,relational servers, non-relational servers or combinations of theseand/or other database servers.

The environment can include a variety of data stores and other memoryand storage media as discussed above. These can reside in a variety oflocations, such as on a storage medium local to (and/or resident in) oneor more of the computers or remote from any or all of the computersacross the network. In a particular set of embodiments, the informationmay reside in a storage-area network (“SAN”) familiar to those skilledin the art. Similarly, any necessary files for performing the functionsattributed to the computers, servers or other network devices may bestored locally and/or remotely, as appropriate. Where a system includescomputerized devices, each such device can include hardware elementsthat may be electrically coupled via a bus, the elements including, forexample, at least one central processing unit (“CPU” or “processor”), atleast one input device (e.g., a mouse, keyboard, controller, touchscreen or keypad) and at least one output device (e.g., a displaydevice, printer or speaker). Such a system may also include one or morestorage devices, such as disk drives, optical storage devices andsolid-state storage devices such as random access memory (“RAM”) orread-only memory (“ROM”), as well as removable media devices, memorycards, flash cards, etc.

Such devices also can include a computer-readable storage media reader,a communications device (e.g., a modem, a network card (wireless orwired), an infrared communication device, etc.) and working memory asdescribed above. The computer-readable storage media reader can beconnected with, or configured to receive, a computer-readable storagemedium, representing remote, local, fixed and/or removable storagedevices as well as storage media for temporarily and/or more permanentlycontaining, storing, transmitting and retrieving computer-readableinformation. The system and various devices also typically will includea number of software applications, modules, services or other elementslocated within at least one working memory device, including anoperating system and application programs, such as a client applicationor web browser. It should be appreciated that alternate embodiments mayhave numerous variations from that described above. For example,customized hardware might also be used and/or particular elements mightbe implemented in hardware, software (including portable software, suchas applets) or both. Further, connection to other computing devices suchas network input/output devices may be employed.

Storage media and computer readable media for containing code, orportions of code, can include any appropriate media known or used in theart, including storage media and communication media, such as, but notlimited to, volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage and/or transmissionof information such as computer readable instructions, data structures,program modules or other data, including RAM, ROM, Electrically ErasableProgrammable Read-Only Memory (“EEPROM”), flash memory or other memorytechnology, Compact Disc Read-Only Memory (“CD-ROM”), digital versatiledisk (DVD) or other optical storage, magnetic cassettes, magnetic tape,magnetic disk storage or other magnetic storage devices or any othermedium which can be used to store the desired information and which canbe accessed by the system device. Based on the disclosure and teachingsprovided herein, a person of ordinary skill in the art will appreciateother ways and/or methods to implement the various embodiments.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made thereuntowithout departing from the broader spirit and scope of the invention asset forth in the claims.

Other variations are within the spirit of the present disclosure. Thus,while the disclosed techniques are susceptible to various modificationsand alternative constructions, certain illustrated embodiments thereofare shown in the drawings and have been described above in detail. Itshould be understood, however, that there is no intention to limit theinvention to the specific form or forms disclosed, but on the contrary,the intention is to cover all modifications, alternative constructionsand equivalents falling within the spirit and scope of the invention, asdefined in the appended claims.

The use of the terms “a” and “an” and “the” and similar referents in thecontext of describing the disclosed embodiments (especially in thecontext of the following claims) are to be construed to cover both thesingular and the plural, unless otherwise indicated herein or clearlycontradicted by context. The terms “comprising,” “having,” “including”and “containing” are to be construed as open-ended terms (i.e., meaning“including, but not limited to,”) unless otherwise noted. The term“connected,” when unmodified and referring to physical connections, isto be construed as partly or wholly contained within, attached to orjoined together, even if there is something intervening. Recitation ofranges of values herein are merely intended to serve as a shorthandmethod of referring individually to each separate value falling withinthe range, unless otherwise indicated herein and each separate value isincorporated into the specification as if it were individually recitedherein. The use of the term “set” (e.g., “a set of items”) or “subset”unless otherwise noted or contradicted by context, is to be construed asa nonempty collection comprising one or more members. Further, unlessotherwise noted or contradicted by context, the term “subset” of acorresponding set does not necessarily denote a proper subset of thecorresponding set, but the subset and the corresponding set may beequal.

Conjunctive language, such as phrases of the form “at least one of A, B,and C,” or “at least one of A, B and C,” unless specifically statedotherwise or otherwise clearly contradicted by context, is otherwiseunderstood with the context as used in general to present that an item,term, etc., may be either A or B or C, or any nonempty subset of the setof A and B and C. For instance, in the illustrative example of a sethaving three members, the conjunctive phrases “at least one of A, B, andC” and “at least one of A, B and C” refer to any of the following sets:{A}, {B}, {C}, {A, B}, {A, C}, {B, C}, {A, B, C}. Thus, such conjunctivelanguage is not generally intended to imply that certain embodimentsrequire at least one of A, at least one of B and at least one of C eachto be present.

Operations of processes described herein can be performed in anysuitable order unless otherwise indicated herein or otherwise clearlycontradicted by context. Processes described herein (or variationsand/or combinations thereof) may be performed under the control of oneor more computer systems configured with executable instructions and maybe implemented as code (e.g., executable instructions, one or morecomputer programs or one or more applications) executing collectively onone or more processors, by hardware or combinations thereof. The codemay be stored on a computer-readable storage medium, for example, in theform of a computer program comprising a plurality of instructionsexecutable by one or more processors. The computer-readable storagemedium may be non-transitory.

The use of any and all examples, or exemplary language (e.g., “such as”)provided herein, is intended merely to better illuminate embodiments ofthe invention and does not pose a limitation on the scope of theinvention unless otherwise claimed. No language in the specificationshould be construed as indicating any non-claimed element as essentialto the practice of the invention.

Embodiments of this disclosure are described herein, including the bestmode known to the inventors for carrying out the invention. Variationsof those embodiments may become apparent to those of ordinary skill inthe art upon reading the foregoing description. The inventors expectskilled artisans to employ such variations as appropriate and theinventors intend for embodiments of the present disclosure to bepracticed otherwise than as specifically described herein. Accordingly,the scope of the present disclosure includes all modifications andequivalents of the subject matter recited in the claims appended heretoas permitted by applicable law. Moreover, any combination of theabove-described elements in all possible variations thereof isencompassed by the scope of the present disclosure unless otherwiseindicated herein or otherwise clearly contradicted by context.

All references, including publications, patent applications and patents,cited herein are hereby incorporated by reference to the same extent asif each reference were individually and specifically indicated to beincorporated by reference and were set forth in its entirety herein.

What is claimed is:
 1. A computer-implemented method, comprising:obtaining a first input code to be used as input for processing computerinstructions reliant on the first input code; determining that a portionof the first input code causes the first input code to be invalid;updating an encoding heuristic to disfavor the portion of the firstinput code that caused the first input code to be invalid; and using theupdated encoding heuristic to generate a second input code.
 2. Thecomputer-implemented method of claim 1, further comprising: determining,based at least in part on information from the first input code,previously inputted codes that were invalid; and updating the encodingheuristic to disfavor portions of the previously inputted codes thatwere invalid.
 3. The computer-implemented method of claim 1, whereindetermining that a portion of the first input code causes the firstinput code to be invalid further comprises comparing the portion of thefirst input code to symbol patterns associated with a valid set ofcodes.
 4. The computer-implemented method of claim 1, whereindetermining that a portion of the first input code causes the firstinput code to be invalid further comprises: decoding the first inputcode to identify a decoding or encoding algorithm; and applying thedecoding or encoding algorithm to the first input code to determinewhether the first input code is valid.
 5. The computer-implementedmethod of claim 1, wherein the first input code is obtained by obtainingthe first input code entered by a user via a graphical user interface ofa computer system.
 6. The computer-implemented method of claim 1,further comprising: associating a penalty value to the second input codebased at least in part on the second input code including portions thatare invalid; determining whether the penalty value exceeds a thresholdvalue; and preventing the second input code from being issued based onthe determination.
 7. The computer-implemented method of claim 1,wherein the second input code has a less likelihood of being enterederroneously than the first input code.
 8. A computer system, comprising:memory storing instructions that, as a result of being executed by oneor more processors of the computer system, cause the system to at least:obtain a first input code for a computer system process reliant on thefirst input code; update an encoding heuristic to disfavor a portion ofthe first input code that causes the first input code to be invalid; anduse the updated encoding heuristic to generate a second input code thathas a lower probability of being entered erroneously than the firstinput code.
 9. The computer system of claim 8, wherein the instructionsfurther cause the computer system to: determine, based at least in parton user attribute information from the first input code, previouslyinputted codes that were invalid; and update the encoding heuristic todisfavor portions of the previously inputted codes that were invalid.10. The computer system of claim 9, wherein the user attributeinformation is obtained from information associated with a user thatentered the first input code via a graphical user interface of thecomputer system.
 11. The computer system of claim 8, wherein theinstructions further cause the computer system to determine that aportion of the first input code is causing the first input code to beinvalid by at least comparing the portion of the first input code tosymbol patterns associated with a valid set of codes.
 12. The computersystem of claim 8, wherein the instructions further cause the computersystem to: determine whether a numeric penalty associated with thesecond input code exceeds a threshold value; and prevent the secondinput code from being issued based on the determination.
 13. Thecomputer system of claim 12, wherein the instructions further cause thecomputer system to associate additional numeric penalties to the secondinput code based at least in part on user attribute information.
 14. Anon-transitory computer-readable storage medium having collectivelystored thereon executable instructions that, as a result of beingexecuted by one or more processors of a computer system, cause thecomputer system to at least: determine that a portion of a first inputcode, input for processing a computer-implemented algorithm reliant onthe first input code, causes the first input code to be invalid;determine, based at least in part on information from the first inputcode, previously inputted codes that were invalid; update an encodingheuristic to disfavor portions of the previously inputted codes thatwere invalid; and use the updated encoding heuristic to generate asecond input code.
 15. The non-transitory computer-readable storagemedium of claim 14, wherein the executable instructions further causethe computer system to associate a probability of being enterederroneously with the second input code.
 16. The non-transitorycomputer-readable storage medium of claim 15, wherein the probabilityassociated with the second input code is lower than a probabilityassociated with the first input code.
 17. The non-transitorycomputer-readable storage medium of claim 16, wherein the instructionsfurther cause the computer system to at least: compare the probabilityassociated with the second input code to a specified range; and inresponse to the probability exceeding the specified range, prevent thesecond input code from being generated.
 18. The non-transitorycomputer-readable storage medium of claim 17, wherein the instructionsfurther cause the computer system to increase the probability associatedwith the second input code based at least in part on user attributeinformation.
 19. The non-transitory computer-readable storage medium ofclaim 14, wherein the instructions further cause the computer system toat least update the encoding heuristic based at least in part on userattribute information associated with a user that entered the firstinput code via a graphical user interface of the computer system. 20.The non-transitory computer-readable storage medium of claim 14, whereinthe instructions further cause the computer system to at least: updatethe encoding heuristic to disfavor the portion of the first input codethat are invalid; and use the updated encoding heuristic to generate thesecond input code.